
import '../../data/models/calendar_day_info_model.dart';

/// 万年历状态管理 - Calendar state management
/// 
/// 管理万年历页面的所有状态数据
/// Manages all state data for the calendar page
class CalendarState {
  /// 是否正在加载 - Whether loading
  bool isLoading;
  
  /// 是否正在加载月份数据 - Whether loading month data
  bool isLoadingMonth;
  
  /// 当前日期 - Current date
  DateTime currentDate;
  
  /// 选中的日期 - Selected date
  DateTime selectedDate;
  
  /// 当前显示的月份 - Current displayed month
  DateTime currentMonth;
  
  /// 选中日期的详细信息 - Selected date detailed info
  CalendarDayInfo? selectedDayInfo;
  
  /// 日期信息缓存 - Day info cache
  Map<String, CalendarDayInfo> dayInfoCache;
  
  /// 日历数据 - Calendar data
  Map<String, CalendarDayInfo> calendarData;
  
  /// 错误信息 - Error message
  String? errorMessage;

  /// 构造函数 - Constructor
  CalendarState({
    this.isLoading = false,
    this.isLoadingMonth = false,
    required this.currentDate,
    required this.selectedDate,
    required this.currentMonth,
    this.selectedDayInfo,
    this.dayInfoCache = const {},
    this.calendarData = const {},
    this.errorMessage,
  });
}